package com.lyl.momanapp.face.net;


import com.lyl.momanapp.face.contract.Constance;
import com.xps.face.bean.FaceDetectResp;

import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

public class DetectWork extends RetrofitUtils {
    private static FaceDetectApi faceApi = RetrofitUtils.getFaceDetectApi();

    /**
     *
     * @param img_base64 base64图像
     * @param sub subscriber
     */
    public static void doDetect(String img_base64, Subscriber<FaceDetectResp> sub) {
        faceApi.doDetect(Constance.KEY, Constance.SECRET, img_base64, "1", "none")
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(sub);
    }

}
